export default {
  // 侧边栏的收缩
  changeCollapsed(state,flag){  
    state.collapsed = flag
  },

  //侧边栏列表
  setRightList (state, data) {
    state.rightList = data
    sessionStorage.setItem('rightList', JSON.stringify(data))
  },

  // 用户信息
  setUserInfo (state, data) {
    state.userInfo = data
    sessionStorage.setItem('userInfo', JSON.stringify(data))
  },

  //退出登录  清除所有登录信息
  claerInfo(state){
    state.rightList = []
    state.userInfo = {}
  },

  //设置一级科室信息
  setCacheDepartments(state, data){
    state.cacheDepartments = data
  },
  //设置二级科室信息
  setCacheSubDepartments(state, data){
    state.cacheSubDepartments = data
  },
  //设置角色列表
  setCacheRoulsList(state, data){
    state.cacheRoulsList = data
  }
};
